package com.tcl.cloudribbon.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @Author liuf
 * @Date 2020/12/29 0:55
 * @Description
 */
@RestController
public class TestController {
    @Autowired
    private RestTemplate restTemplate;


    @RequestMapping
    public String

    ribbonTest() {
        ResponseEntity<String> forEntity = restTemplate.getForEntity("http://user-client/user" + "/get", String.class);
        return forEntity.getBody();
    }
}